('vncconsole', int),
('pae', int),
('apic', int),
- ('acpi', int),
]
LEGACY_IMAGE_HVM_DEVICES_CFG = [
('isa', str),
('keymap', str),
('localtime', str),
- ('serial', str),
+ ('serial', str),
+ ('stdvga', int),
('soundhw', str),
('usb', str),
('usbdevice', str),
if 'hvm' in self['image']:
for arg, conv in LEGACY_IMAGE_HVM_CFG:
- if self['image']['hvm'].has_key(arg):
+ if self['image']['hvm'].get(arg):
image.append([arg, self['image']['hvm'][arg]])
if 'hvm' in self['image'] and 'devices' in self['image']['hvm']:
for arg, conv in LEGACY_IMAGE_HVM_DEVICES_CFG:
- if self['image']['hvm']['devices'].has_key(arg):
+ if self['image']['hvm']['devices'].get(arg):
image.append([arg,
self['image']['hvm']['devices'][arg]])
self.dmargs += self.configVNC(imageConfig)
self.pae = imageConfig['hvm'].get('pae', 0)
- self.acpi = imageConfig['hvm'].get('acpi', 0)
self.apic = imageConfig['hvm'].get('apic', 0)
+ self.acpi = imageConfig['hvm']['devices'].get('acpi', 0)
+
def buildDomain(self):
store_evtchn = self.vm.getStorePort()
for a in dmargs:
v = hvmDeviceConfig.get(a)
- if a == 'vcpus':
- v = hvmDeviceConfig.get('vcpus_number')
# python doesn't allow '-' in variable names
if a == 'stdvga': a = 'std-vga'